package Web.controller;

import Web.domain.ResponseResult;
import Web.domain.entity.Like;
import Web.service.LikeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/fans")
public class LikeController {
    @Autowired
    LikeService likeService;
    @ApiOperation("关注用户list")
    @GetMapping("/like/{id}")
    ResponseResult getLikeUsers(@PathVariable("id") Long id){
        return likeService.getLikeUsers(id);
    }
    @ApiOperation("粉丝用户list")
    @GetMapping("/liked/{id}")
    ResponseResult getLikedUsers(@PathVariable("id") Long id){
        return likeService.getLikedUsers(id);
    }
    @GetMapping("/likeDetial/{id}")
    ResponseResult getLikeDetail(@PathVariable("id") Long id) {return  likeService.getLikeDetail(id);}
    @PostMapping("/likeStatus")
    ResponseResult getLikeDetail(@RequestBody Like like) {return  likeService.getLikeStatus(like);}
}
